﻿SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[bhp_NemoGroupCheckName]
	@Name			NVARCHAR(400)
AS
BEGIN

	DECLARE
		@Ret		BIT

	SET @Ret = 1

	IF EXISTS (SELECT 1 FROM [sTree] WHERE [name] = @Name AND del = 0)
		SET @Ret = 0

	IF EXISTS (SELECT 1 FROM [bht_Groups] WHERE [Name] = @Name)
		SET @Ret = 0

	SELECT @Ret

END
GO


